package Util;

import java.awt.BorderLayout;

import java.awt.Color;
import java.awt.Font;
import java.awt.GridLayout;
import java.awt.HeadlessException;
import java.awt.LayoutManager;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.beans.Statement;
import java.io.IOException;
import java.io.PrintWriter;
import java.net.InetAddress;
import java.net.Socket;
import java.net.UnknownHostException;
import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.Scanner;
import javax.swing.ImageIcon;
import javax.swing.JButton;
import javax.swing.JFormattedTextField;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.JTextArea;
import javax.swing.JTextField;
import javax.swing.border.LineBorder;
public class jFrame1 extends JFrame {
	public  
	JPanel mainpanel;
	JPanel panel5;
	JPanel panel6;
	JPanel panel7;
	JPanel panel8;
	JButton Button5;
	JButton Button6;
	JButton Button7;
	JButton Button8;
	public   jFrame1(){
		LayoutManager layoutManager = new GridLayout(4,1);
        setLayout(layoutManager);
        setTitle("书店销售系统");
        setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		setBounds(400, 400, 485, 343);
		setLocationRelativeTo(null);
		mainpanel= new JPanel(new GridLayout(4,1));
		Button5 = new JButton("图书");
		Button5.setBounds(100, 10, 300, 100);
		Button5.addActionListener(new ActionListener(){

			@Override
			public void actionPerformed(ActionEvent e) {
				// TODO Auto-generated method stub
				 new jFrame2(); //打开第二个窗口后将第一个设置为不可见
				
				
			}
    		
    	});
		
		Button6= new JButton("会员");
		Button6.setBounds(100, 20, 300,  100);
		Button6.addActionListener(new ActionListener(){

			@Override
			public void actionPerformed(ActionEvent e) {
				// TODO Auto-generated method stub
				new jFrame3();
			}
    		
			
    	});
		Button7 = new JButton("销售");
		Button6.setBounds(100, 30,300, 100);
		Button7.addActionListener(new ActionListener(){

			@Override
			public void actionPerformed(ActionEvent e) {
				// TODO Auto-generated method stub
				
				new jFrame4();
			}
    		
    	});
		Button8 =new JButton("导出数据");
		Button6.setBounds(100,30,  300,100);
		Button8.addActionListener(new  ActionListener(){

			@Override
			public void actionPerformed(ActionEvent e) {
				// TODO Auto-generated method stub
				new jFrame5();
			}
    		
    	});
		panel5 = new JPanel();
    	panel6 = new JPanel();
    	panel7 = new JPanel();
    	panel8 = new JPanel();
    	panel5.add(Button5);
    	panel6.add(Button6);
    	panel7.add(Button7);
    	panel8.add(Button8);
    	add(panel5);
     	add(panel6);
     	add(panel7);
     	add(panel8);
		setVisible(true);
		
	}




}
